#
# process #include directores in .shtml files
# in fashion of Apache's SSI includes
#
# the tags: <!-- #include virtual="*" --> are replaced by content of a file
# 

.SUFFIXES: .shtml .html

TARGETS= munipack.html features.html download.html docs.html \
         basic.html tutorial.html external.html classics.html \
         cbasic.html ctutorial.html colorspace.html colorfits.html \
         itone.html guide.html faq.html fitsut.html vobs.html \
         astrometry.html astrometry_guide.html history.html \
         modules.html credits.html pererr.html

#TARGETS=$(patsubst %.shtml,%.html,$(wildcard *.html))

all: $(TARGETS)

install: all
	ln -sf munipack.html index.html

.ONESHELL:
mini:
	for A in Screenshot-*.png; do \
           convert $${A} -resize 300x200 $${A%.png}-mini.png; \
        done
	convert big_logo.png -resize 100x100 title_logo.png

feed:
	python munipack-atom.py > news_feed.xml

clean:
	rm -f $(TARGETS); rm -f *~; rm -f Screenshot-*-mini.png; \
        rm -f title_logo.png; \
        rm -f index.html

.shtml.html:
	awk -f include.awk $< >$@
